﻿@model string

@(Html.DevExtreme().List()
    .ID(@Model)
    .Height(380)
    .DataSource(d => d.Mvc()
        .Controller("ListItemDraggingEditing")
        .Key("ID")
        .LoadAction(string.Format("Get{0}", @Model))
        .InsertAction(string.Format("Insert{0}", @Model))
        .UpdateAction(string.Format("Update{0}", @Model))
        .DeleteAction(string.Format("Delete{0}", @Model))
    )
    .DataSourceOptions(dso => dso.Paginate(false))
    .DataSourceOptions(o => o.ReshapeOnPush(true).Sort("Sort"))
    .DisplayExpr("Text")
    .ItemDragging(id => id
        .AllowReordering(true)
        .Group("tasks")
        .OnDragStart("onDragStart")
        .OnAdd("onAdd")
        .OnRemove("onRemove")
        .OnReorder("onReorder")
    )
)
